﻿<?xml version="1.0" encoding="utf-8" ?>
<DataStructure>
  <TableStructure>
    <Table  Name="SalesOrder" Description="销售订单" Type="Document"  ClassName="SalesOrder">
      <Field Name="DocEntry" Description="单据编号" DbType="int" PSize="" SSize="" DefaultValue="" PropertyName="DocumentEntry" IsPrimaryKey="Yes" IsUnionKey="" IsNull=""/>
      <Field Name="DocNum" Description="单据编码" DbType="nvarchar" PSize="max" SSize="" DefaultValue="" PropertyName="DocumentNumber" IsPrimaryKey="" IsUnionKey="" IsNull=""/>
      <Field Name="ObjType" Description="对象" DbType="nvarchar" PSize="max" SSize="" DefaultValue="" PropertyName="ObjectType" IsPrimaryKey="" IsUnionKey="" IsNull=""/>
      <Field Name="Canceled" Description="已取消" DbType="char" PSize="1" SSize="" DefaultValue="N" PropertyName="Canceled" IsPrimaryKey="" IsUnionKey="" IsNull="">
        <ValidDataType name="BOYesOrNo">
          <ValidValue Name="Yes" value="Y" Description="是"/>
          <ValidValue Name="No" value="N" Description="否"/>
        </ValidDataType>
      </Field>
      <Field Name="Closed" Description="已关闭" DbType="char" PSize="1" SSize="" DefaultValue="N" PropertyName="Closed" IsPrimaryKey="" IsUnionKey="" IsNull="">
        <ValidDataType name="BOYesOrNo">
          <ValidValue Name="Yes" value="Y" Description="是"/>
          <ValidValue Name="No" value="N" Description="否"/>
        </ValidDataType>
      </Field>
      <Field Name="Creator" Description="创建人" DbType="int" PSize="" SSize="" DefaultValue="" PropertyName="Creator" IsPrimaryKey="" IsUnionKey="" IsNull=""/>
      <Field Name="CreateDate" Description="创建时间" DbType="Datetime" PSize="" SSize="" DefaultValue="" PropertyName="CreateDate" IsPrimaryKey="" IsUnionKey="" IsNull=""/>
      <Field Name="Updator" Description="更新人" DbType="int" PSize="" SSize="" DefaultValue="" PropertyName="Updator" IsPrimaryKey="" IsUnionKey="" IsNull="Yes"/>
      <Field Name="UpdateDate" Description="更新时间" DbType="Datetime" PSize="" SSize="" DefaultValue="" PropertyName="UpdateDate" IsPrimaryKey="" IsUnionKey="" IsNull="Yes"/>
      <Field Name="Remarks" Description="备注" DbType="ntext" PSize="" SSize="" DefaultValue="" PropertyName="Remarks" IsPrimaryKey="" IsUnionKey="" IsNull="Yes"/>
      <Field Name="DocStatus" Description="单据状态" DbType="char" PSize="1" SSize="" DefaultValue="O" PropertyName="DocumentStatus" IsPrimaryKey="" IsUnionKey="" IsNull="">
        <ValidDataType name="BODocStatus">
          <ValidValue Name="Open" value="O" Description="未清"/>
          <ValidValue Name="Close" value="C" Description="已清"/>
        </ValidDataType>
      </Field>
      <Field Name="CardCode" Description="客户编码" DbType="nvarchar" PSize="30" SSize="" DefaultValue="" PropertyName="CardCode" IsPrimaryKey="" IsUnionKey="" IsNull=""/>
      <Field Name="CardName" Description="客户名称" DbType="nvarchar" PSize="max" SSize="" DefaultValue="" PropertyName="CardName" IsPrimaryKey="" IsUnionKey="" IsNull=""/>
      <Field Name="DocDate" Description="单据日期" DbType="Datetime" PSize="" SSize="" DefaultValue="" PropertyName="DocDate" IsPrimaryKey="" IsUnionKey="" IsNull=""/>
      <Field Name="DocTotal" Description="单据总计" DbType="numeric" PSize="19" SSize="6" DefaultValue="" PropertyName="DocTotal" IsPrimaryKey="" IsUnionKey="" IsNull=""/>
      <Field Name="IsPartDelivery" Description="部分交货" DbType="char" PSize="1" SSize="" DefaultValue="Y" PropertyName="IsPartDelivery" IsPrimaryKey="" IsUnionKey="" IsNull="">
        <ValidDataType name="BOYesOrNo">
          <ValidValue Name="Yes" value="Y" Description="是"/>
          <ValidValue Name="No" value="N" Description="否"/>
        </ValidDataType>
      </Field>
    </Table>
    <Table Name="SalesOrderLines" Description="销售订单行" Type="DocumentLine"  ClassName="SalesOrderLine">
      <Field Name="DocEntry" Description="单据编号" DbType="int" PSize="" SSize="" DefaultValue="" PropertyName="DocumentEntry" IsPrimaryKey="Yes" IsUnionKey="" IsNull=""/>      
      <Field Name="LineNum" Description="行号" DbType="int" PSize="" SSize="" DefaultValue="" PropertyName="LineNumber" IsPrimaryKey="" IsUnionKey="Yes" IsNull=""/>
      <Field Name="VisOrder" Description="顺序号" DbType="int" PSize="" SSize="" DefaultValue="" PropertyName="VisilbeOrder" IsPrimaryKey="" IsUnionKey="" IsNull=""/>
      <Field Name="ObjType" Description="对象" DbType="nvarchar" PSize="max" SSize="" DefaultValue="" PropertyName="ObjectType" IsPrimaryKey="" IsUnionKey="" IsNull=""/>
      <Field Name="LineStatus" Description="行状态" DbType="char" PSize="1" SSize="" DefaultValue="O" PropertyName="LineStatus" IsPrimaryKey="" IsUnionKey="" IsNull="">
        <ValidDataType name="BOLineStatus">
          <ValidValue Name="Open" value="O" Description="未清"/>
          <ValidValue Name="Close" value="C" Description="已清"/>
        </ValidDataType>
      </Field>
      <Field Name="Canceled" Description="已取消" DbType="char" PSize="1" SSize="" DefaultValue="N" PropertyName="Canceled" IsPrimaryKey="" IsUnionKey="" IsNull="">
        <ValidDataType name="BOYesOrNo">
          <ValidValue Name="Yes" value="Y" Description="是"/>
          <ValidValue Name="No" value="N" Description="否"/>
        </ValidDataType>
      </Field>
      <Field Name="Closed" Description="已关闭" DbType="char" PSize="1" SSize="" DefaultValue="N" PropertyName="Closed" IsPrimaryKey="" IsUnionKey="" IsNull="">
        <ValidDataType name="BOYesOrNo">
          <ValidValue Name="Yes" value="Y" Description="是"/>
          <ValidValue Name="No" value="N" Description="否"/>
        </ValidDataType>
      </Field>
      <Field Name="Creator" Description="创建人" DbType="int" PSize="" SSize="" DefaultValue="" PropertyName="Creator" IsPrimaryKey="" IsUnionKey="" IsNull=""/>
      <Field Name="CreateDate" Description="创建时间" DbType="Datetime" PSize="" SSize="" DefaultValue="" PropertyName="CreateDate" IsPrimaryKey="" IsUnionKey="" IsNull=""/>
      <Field Name="Updator" Description="更新人" DbType="int" PSize="" SSize="" DefaultValue="" PropertyName="Updator" IsPrimaryKey="" IsUnionKey="" IsNull="Yes"/>
      <Field Name="UpdateDate" Description="更新时间" DbType="Datetime" PSize="" SSize="" DefaultValue="" PropertyName="UpdateDate" IsPrimaryKey="" IsUnionKey="" IsNull="Yes"/>
      <Field Name="Remarks" Description="备注" DbType="ntext" PSize="" SSize="" DefaultValue="" PropertyName="Remarks" IsPrimaryKey="" IsUnionKey="" IsNull="Yes"/>
      <Field Name="ItemCode" Description="物料编码" DbType="nvarchar" PSize="30" SSize="" DefaultValue="" PropertyName="ItemCode" IsPrimaryKey="" IsUnionKey="" IsNull=""/>
      <Field Name="ItemName" Description="物料描述" DbType="nvarchar" PSize="max" SSize="" DefaultValue="" PropertyName="ItemName" IsPrimaryKey="" IsUnionKey="" IsNull="Yes"/>
      <Field Name="Price" Description="价格" DbType="numeric" PSize="19" SSize="6" DefaultValue="" PropertyName="Price" IsPrimaryKey="" IsUnionKey="" IsNull="Yes"/>
      <Field Name="Quantity" Description="数据" DbType="numeric" PSize="19" SSize="6" DefaultValue="" PropertyName="Quantity" IsPrimaryKey="" IsUnionKey="" IsNull="Yes"/>
      <Field Name="LineTotal" Description="行总计" DbType="numeric" PSize="19" SSize="6" DefaultValue="" PropertyName="LineTotal" IsPrimaryKey="" IsUnionKey="" IsNull="Yes"/>
    </Table>
  </TableStructure>
  <ObjectStructure>
    <Object ObjectType="Document" ObjectCode="SalesOrder" ObjectName="销售订单" TableName="SalesOrder" NameSpace="SalesOrder" IsLog="">
      <ChildTables>
        <ChildTable TableName="SalesOrderLines"/>
      </ChildTables>
    </Object>
  </ObjectStructure>
</DataStructure>